/***************************************************************************
   Filename:    Interface.h
   Author:      Josh Partridge
   Description: The interface class
****************************************************************************/

#ifndef INTERFACE_H_INCLUDED
#define INTERFACE_H_INCLUDED

#include <fstream>
#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include "Brush.h"
#include "helpers.h"
#include "boxgen.h"

using namespace std;

//how many lines of text to display at a time
const unsigned int maxSize = 32;

class Interface
{
    private:
        /************************************************************************************
         Name:               readFile
         Description:        reads entire file as one string, line by line
         Input:
                   filename: string representing name of file to read
         Output:
                     return: string representing contents of file
        *************************************************************************************/
        string readFile(string filename);

    public:
        /************************************************************************************
         Name:               Interface - default constructor
         Description:        empty
        *************************************************************************************/
        Interface();

        /************************************************************************************
         Name:               splashTitle
         Description:        Displays the title splash
         Input:
                      brush: reference to main's Brush
        *************************************************************************************/
        void splashTitle(Brush& brush);

        /************************************************************************************
         Name:               dispInstructions
         Description:        Displays the instructions file
         Input:
                      brush: reference to main's Brush
        *************************************************************************************/
        void dispInstructions(Brush& brush);

        /************************************************************************************
         Name:               dispScoreboard
         Description:        Displays the scoreboard ("top 10", "high scores", "hall of fame")
         Input:
                      brush: reference to main's Brush
        *************************************************************************************/
        void dispScoreboard(Brush& brush);

        /************************************************************************************
         Name:               handleInput
         Description:        allows user to scroll and return to menu
         Input:
                         ch: character representing key pressed
                       quit: reference to boolean representing if user wants to return to menu
                     length: number of lines in the instructions file
                   scrolled: reference to unsigned integer representing number of lines that
                             have been scrolled
        *************************************************************************************/
        bool handleInput(char ch, bool &quit, int length, unsigned int &scrolled);
};

#endif // INTERFACE_H_INCLUDED
